Alex85pro / [Linls|Fix]

// ==UserScript==
// @name [Linls|Fix]
// @description new.vk.com
// @include     *://vk.com/*
// @version     1.1
// @copyright 2016, flyink13 (Evgenii Kotliarov k-94.ru)
// @author flyink13s
// @icon https://k-94.ru/assets/logo-black.svg
// ==/UserScript==

window.addEventListener("load",function(){
    getTemplate = (function(org){
    	return function(tplName, state){
    		if(tplName =="im_msg_row"){
    			state.text = state.text
    				.replace(
    					/\[((?:club|id)[0-9]+)\|(.+?)\]/g,
    					"<a target=\"blank\" href=\"/$1\">$2</a>"); 
    		}
    		return org.apply(this,arguments);
    	};
    })(getTemplate);  
});